
let channelId =getQuery("channelId");

function returns() {
    location.href = "/stick.html?channelId="+channelId;
}


function insertPosrt() {
    axios.get("/stick/add",{
        params:{
            stickTitle:$("title").value,
            stickContent:$("content").value,
            channelId
        }
    }).then(resp =>{
        var data = resp.data;
        if (data == "ok"){
            returns()
        }else if(data == "noland"){
            location.href="/login.html?info=noland"
        }
    })
}